package com.wymobilearchitecture.demo

import android.content.Intent
import android.os.Bundle
import android.view.View
import com.wy.common.base.BaseActivity
import com.wymobilearchitecture.R
import com.wymobilearchitecture.demo.banner.BannerActivity
import com.wymobilearchitecture.demo.log.WLogDemo
import com.wymobilearchitecture.demo.tab.TabBottomActivity
import com.wymobilearchitecture.study.activity.ViewTreeActivity
import com.wymobilearchitecture.study.recyclerview.RecyclerViewActivity
import com.wymobilearchitecture.study.thread.ThreadActivity

class DemoActivity : BaseActivity() ,View.OnClickListener{

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        setContentView(R.layout.activity_demo)
    }


    override fun onClick(v: View?) {

        when(v!!.id){

            R.id.btn_log -> {
                startActivity(Intent(this@DemoActivity, WLogDemo::class.java))
            }

            R.id.btn_tab -> {
                startActivity(Intent(this@DemoActivity, TabBottomActivity::class.java))
            }

            R.id.btn_banner ->{
                startActivity(Intent(this@DemoActivity, BannerActivity::class.java))
            }

            R.id.btn_activity ->{
                startActivity(Intent(this@DemoActivity, ViewTreeActivity::class.java))

            }

            R.id.btn_recycler_view ->{
                startActivity(Intent(this@DemoActivity, RecyclerViewActivity::class.java))

            }

            R.id.btn_thread ->{
                startActivity(Intent(this@DemoActivity, ThreadActivity::class.java))

            }

        }
    }
}